package com.example.controller;

import com.example.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：songxusheng
 * @description：测试调用
 * @date ：Created in 2022/6/21 9:40
 * @version:
 */
@RestController
public class TestController {
    @Autowired
    private TestService helloService;

    @GetMapping("/hello")
    public String hello() {
        // 调用本地方法，并通过HTTP协议进行响应
        return "hello from " + helloService.getName();
    }
}
